package com.henry.Test;

import com.henry.Client.ClientData;
import com.henry.Client.ClientInitClose;
import com.henry.Client.ClientScanner;
import com.henry.Client.ClientView;

import java.io.IOException;

public class ClientTest {

    public static void main(String[] args) {

        ClientInitClose cic = null;
        try {
            cic = new ClientInitClose();
            cic.clientInit();
            ClientData.dataInput("e:/questions.txt");
            ClientView cv = new ClientView(cic);
            cv.initClientView();
        } catch (IOException | ClassNotFoundException e) {
            e.printStackTrace();
        } finally {
            try {
                ClientData.dataOutput();
            } catch (IOException e) {
                e.printStackTrace();
            }
            try {
                ClientData.dataClose();
            } catch (IOException e) {
                e.printStackTrace();
            }
            try {
                assert cic != null;
                cic.clientClose();
                ClientScanner.closeScanner();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
